package cn.mldn.jedis;

import redis.clients.jedis.Jedis;


/***
 * 
 * 设置hash数据 测试
 * */
public class HashDataDemo {
	public static final String REDIS_HOST="127.0.0.1";
	public static final int REDIS_PORT=6379;
	public static void main(String[] args) {
		Jedis jedis=new Jedis(REDIS_HOST,REDIS_PORT);
		
		jedis.hset("user-mldn", "name", "张三");
		jedis.hset("user-mldn","age", "15");
		System.out.println(jedis.hget("user-mldn","name"));
		System.out.println(jedis.hget("user-mldn", "age"));
		
		jedis.close();  //返回  pong  则连接成功
	}
}
